<?php 
	//$va= array("baseline","baseline","sub","super","top","text-top","middle", "bottom", "text-bottom");
	$va = array(
		"left",
		"right",
		"center",
		"justify",
		"letter-justify",
		"stretch-justify"
		);
	$width = 480;
	$height = (count($va) + 1)*50;
	$f = array(10,50);
	$e = array($width-10,50);
	$font = "25px tahoma,arial";
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>VML</title>
	<style>
		v\: * {
			behavior:url(#default#VML);
			display:block;
			position:absolute;
		}
		#vmlc {
			background:#f2f2f2;
			width:<?=$width?>px;
			height:<?=$height?>px;
			position:relative;
			overflow:hidden;
		}
		html {
			overflow:hidden;
		}
	</style>
</head>
<body>
	<div id="vmlc">
	<? foreach($va as $k => $v){ ?>
	<v:shape id="sp_<?=$k?>" style="width:<?=$width?>;height:<?=$height?>;"
		strokecolor="red"
		strokeweight="1px"
		coordorigin="0 0 " 
		coordsize="<?=$width?> <?=$height?>"
		>
		<v:path v="m <?=$f[0]?>,<?=($f[1] + 50*$k)?> l <?=$e[0]?>,<?=($f[1] + 50*$k)?>" textpathok="True"/>
		<v:fill on="false" color="red" type="solid"/>
		<v:stroke on="true" color="blue" />
		<v:textpath 
			on="true"
			xscale="true"
			style="
				font:<?=$font?>; 
				V-Text-Align:<?=$v?>;"
			
			string="hello text(<?=$v?>)"
		/>
	</v:shape>
	
	<v:line from="<?=$f[0]?> <?=($f[1] + 50*$k)?>" to="<?=$e[0]?> <?=($f[1] + 50*$k)?>"></v:line>
	<? } ?>
	</div>
	<script type="text/javascript">
		var el = document.getElementById("sp_1");
		var el2 = document.createElement("v:shape");
		el.appendChild(el2);
		console.log(el.tagName);
			console.log(el2.tagName);
		//console.log(el.parentNode.tagName);
		el.parentNode.removeChild(el);
	</script>
</body>
</html>